<%--
  Created by IntelliJ IDEA.
  User: 12460
  Date: 2024/11/30
  Time: 14:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
        //分别向四大作用域添加内容
        pageContext.setAttribute("name","页面域");
        request.setAttribute("name","请求域");
        session.setAttribute("name","会话域");
        application.setAttribute("name","上下文域");
    %>
    jsp取法：
    <%=pageContext.getAttribute("name") %> <hr>
    <%=request.getAttribute("name") %> <hr>
    <%=session.getAttribute("name") %><hr>
    <%=application.getAttribute("name") %><hr>
    <hr>
    EL表达式写法
    <h2> ${name}</h2>
    ${pageScope.name}<hr>
    ${requestScope.name}<hr>
    ${sessionScope.name}<hr>
    ${applicationScope.name}<hr>

</body>
</html>
